<?php /* Smarty version 2.6.16, created on 2013-09-03 19:00:16
         compiled from ../templates/admin/postjobs/editpostjob.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'base64_decode', '../templates/admin/postjobs/editpostjob.tpl', 42, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  echo '<script src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/admin/editpostjob.js" type="text/javascript"></script><script src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/admin/ajax.js" type="text/javascript" ></script>'; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>


<?php echo '
<script type="text/javascript">

function showJobType(jid)
{
	if(jid!=\'\')
	{
		ajax.sendrequest("GET",SITEROOT + "/modules/register/show_jobtype.php",{jobtypeid:jid},"","isJobType");
	}
	else
		document.getElementById(\'jobtype\').value=\'\';
}

</script>
'; ?>


 <div class="contain">
 
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['left_menu'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      
      <div class="right_contain">
        
         <div class="heading_box">Edit Job Post</div>
         <div class="whitebox">
         <!--Message Div Start-->
         <?php if ($this->_tpl_vars['msg']): ?>
         <div class="masg_div">
           <?php echo $this->_tpl_vars['msg']; ?>

         </div>
         <?php endif; ?>
         <!--Message Div End-->
         
         <form name="frmEditjob" id="frmEditjob" action="" method="post"  enctype="multipart/form-data">
         <input type="hidden" name="hidden_jobid" id="hidden_jobid" value="<?php echo ((is_array($_tmp=$_GET['id'])) ? $this->_run_mod_handler('base64_decode', true, $_tmp) : base64_decode($_tmp)); ?>
" />
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox">
             <dl>
              <dt>Trade Category:<span class="error">*</span></dt>
              <dd><select class="select" name="trade" id="trade" onchange="showJobType(this.value);">
              <option value="">Select Trade Category</option>
               <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['newtradecategoryArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                     	<option value="<?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['job_details']['trade_id'] == $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['id']): ?> selected="selected" <?php endif; ?>><?php echo $this->_tpl_vars['newtradecategoryArray'][$this->_sections['i']['index']]['trade_category']; ?>
</option>
               <?php endfor; endif; ?> 
              </select>
              </dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Job Type:<span class="error">*</span></dt>
              <dd>
               <div id="isJobType">
              <select class="select" name="jobtype" id="jobtype">
              <option value="">Select Job Type</option>
             <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['jobtypeArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                <option value="<?php echo $this->_tpl_vars['jobtypeArray'][$this->_sections['i']['index']]['id']; ?>
" <?php if ($this->_tpl_vars['job_details']['jobtype_id'] == $this->_tpl_vars['jobtypeArray'][$this->_sections['i']['index']]['id']): ?> selected="selected" <?php endif; ?>><?php echo $this->_tpl_vars['jobtypeArray'][$this->_sections['i']['index']]['trade_category']; ?>
</option>
             <?php endfor; endif; ?> 
              </select>
              </div>
              </dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Job Description:<span class="error">*</span></dt>
              <dd><textarea id="job_desc" name="job_desc" rows="5" cols="45" class="textarea" ><?php echo $this->_tpl_vars['job_details']['job_desc']; ?>
</textarea></dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Work Start In:<span class="error">*</span></dt>
              <dd><select name="work_to_start" id="work_to_start" class="select" >
                        	<option value="">- Select -</option>
                            <option value="asap" <?php if ($this->_tpl_vars['job_details']['workstart'] == 'asap'): ?> selected="selected" <?php endif; ?>>As soon as possible</option>
                            <option value="1 week" <?php if ($this->_tpl_vars['job_details']['workstart'] == '1 week'): ?> selected="selected" <?php endif; ?>>1 week</option>
                            <option value="2 weeks" <?php if ($this->_tpl_vars['job_details']['workstart'] == '2 weeks'): ?> selected="selected" <?php endif; ?>>2 weeks</option>
                            <option value="1 month" <?php if ($this->_tpl_vars['job_details']['workstart'] == '1 month'): ?> selected="selected" <?php endif; ?>>1 month +</option>
                        	</select></dd>
              <div class="clear"></div>
             </dl>
                          
             <dl>
              <dt>Approx Budget:<span class="error">*</span></dt>
              <dd><select class="select" name="approx_budget" id="approx_budget">
              <option value="">Select an approx budget</option>
			 	<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['getallactivebudgetArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                	<option value="<?php echo $this->_tpl_vars['getallactivebudgetArray'][$this->_sections['i']['index']]['budget_id']; ?>
" <?php if ($this->_tpl_vars['job_details']['approx_budget'] == $this->_tpl_vars['getallactivebudgetArray'][$this->_sections['i']['index']]['budget_id']): ?> selected="selected" <?php endif; ?>>Under $<?php echo $this->_tpl_vars['getallactivebudgetArray'][$this->_sections['i']['index']]['budget_name']; ?>
</option>
            	<?php endfor; endif; ?>                                            </select></dd>
              <div class="clear"></div>
             </dl>
             
             <dl>
              <dt>Postal Code:<span class="error">*</span></dt>
              <dd><input type="text" class="input" name="postcode" id="postcode" value="<?php echo $this->_tpl_vars['job_details']['area']; ?>
" maxlength="15"/></dd>
              <div class="clear"></div>
             </dl>
			 
			 <dl>
              <dt>Select State:<span class="error">*</span></dt>
              <dd><select class="select" name="state_id" id="state_id">
              <option value="">Select State</option>
			 	<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['stateArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
						<option value="<?php echo $this->_tpl_vars['stateArray'][$this->_sections['i']['index']]['state_id']; ?>
" <?php if ($this->_tpl_vars['job_details']['state_id'] == $this->_tpl_vars['stateArray'][$this->_sections['i']['index']]['state_id']): ?> selected="selected"  <?php endif; ?>><?php echo $this->_tpl_vars['stateArray'][$this->_sections['i']['index']]['state_name']; ?>
</option>
						<?php endfor; endif; ?>                                         </select></dd>
              <div class="clear"></div>
             </dl>
			 
			 
             
            <dl>
                <dt><label>Job Photo : </label></dt>
                <dd><?php if ($this->_tpl_vars['job_details']['image']): ?>
                        <section class="com_logo_img_wrapp">
                        <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/includes/image.php?width=130&amp;height=130&amp;image=<?php echo $this->_tpl_vars['siteroot']; ?>
/uploads/job/<?php echo $this->_tpl_vars['job_details']['image']; ?>
" title="job logo" alt="job logo"/>
                        </section>
                    <?php else: ?>	
                    <section class="com_logo_img_wrapp">
                        <img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/uploads/job/featredjob_img1.jpg" height="130px" width="130px"  />
                        </section>
                    <?php endif; ?>  
                    <input type="file" id="joblogo" name="joblogo"  style="margin-top:20px;" />     
                 </dd>
                <div class="clear"></div>
            </dl>
            
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="addpostjob_btn" id="addpostjob_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel" onclick="window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=postjobs&userid=<?php echo $_GET['userid']; ?>
&page=<?php echo $_GET['page']; ?>
';"/></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>